APP_JAR=go-relax.jar

pid=`ps -ef | grep java | grep $APP_JAR |awk '{print $2}'`

echo "kill-----"$APP_JAR "pid-----"$pid

[ -n "$pid" ] && kill -9 $pid

echo "process killed....pid:"$pid

# -Dloader.path="lib/"
sleep 5

JAVA_OPTS="-server -Xms4096m -Xmx6144m -Xss1024k -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m -XX:MaxGCPauseMillis=500 -XX:+UseG1GC -Xloggc:/home/admin/gc.log -XX:+PrintGCDetails -XX:-OmitStackTraceInFastThrow -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=50 "

nohup java -jar $JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8887 -Dspring.profiles.active=local /home/admin/go-relax.jar > go-relax.log  2>&1 &

#nohup java -jar -Dspring.profiles.active=local /home/admin/go-relax.jar > go-relax.log  2>&1 &

pid=`ps -ef | grep java | grep $APP_JAR |awk '{print $2}'`

echo "process started....pid:"$pid